package com.feihua.starter.service.impl;

import com.feihua.starter.service.api.ApiHdbAttendPoService;
import com.feihua.starter.service.mapper.HdbAttendPoMapper;
import com.feihua.starter.service.modules.hdb.dto.HdbAttendDto;
import com.feihua.starter.service.modules.hdb.dto.SearchHdbAttendsConditionDto;
import com.feihua.starter.service.modules.hdb.po.HdbAttendPo;
import com.github.pagehelper.Page;
import feihua.jdbc.api.pojo.PageResultDto;
import feihua.jdbc.api.service.impl.ApiBaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * This class was generated by MyBatis Generator.
 *
 * @author revolver 2018-06-29 22:26:31
 */
@Service
public class ApiHdbAttendPoServiceImpl extends ApiBaseServiceImpl<HdbAttendPo, HdbAttendDto, String> implements ApiHdbAttendPoService {
    @Autowired
    HdbAttendPoMapper hdbAttendPoMapper;

    public ApiHdbAttendPoServiceImpl() {
        super(HdbAttendDto.class);
    }

    @Override
    public PageResultDto<HdbAttendDto> searchByMultiTable(SearchHdbAttendsConditionDto dto, feihua.jdbc.api.pojo.PageAndOrderbyParamDto pageAndOrderbyParamDto) {
        Page p = super.pageAndOrderbyStart(pageAndOrderbyParamDto);
        List<HdbAttendDto> list = hdbAttendPoMapper.searchByMultiTable(dto);
        return new PageResultDto(list, this.wrapPage(p));
    }
}